package it.bambo.tankwars.model;

/**
 * Andreas Baumgartner: andreas@bambo.it
 */
public enum ControlType {

    BOT, KEYBOARD, WIIMOTE1(1), WIIMOTE2(2);

    private int value = -1;

    private ControlType() {
    }

    private ControlType(int value) {
        this.value = value;
    }

    public static ControlType getControllerType(int value) {
        for (ControlType controlType : ControlType.values()) {
            if (value == controlType.getValue()) {
                return controlType;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }
}
